package net.hvacapp.cmvrfforandroid.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by zhangnorman on 15/7/14.
 */
public class UserProfileData implements Parcelable {
    private String contactName;
    private String name;
    private String operationCities;
    private String operationNations;
    private String operationProvinces;
    private String operationCitieNames;

    public String getOperationCityNames() {
        return operationCitieNames;
    }

    public void setOperationCityNames(String operationCitieNames) {
        this.operationCitieNames = operationCitieNames;
    }

    public String getOperationNationNames() {
        return operationNationNames;
    }

    public void setOperationNationNames(String operationNationNames) {
        this.operationNationNames = operationNationNames;
    }

    public String getOperationProvinceNames() {
        return operationProvinceNames;
    }

    public void setOperationProvinceNames(String operationProvinceNames) {
        this.operationProvinceNames = operationProvinceNames;
    }

    private String operationNationNames;
    private String operationProvinceNames;
    private String parentCompany;
    private String parentCompanyUserName;
    private String phoneNumber;
    private String role;
    private String userName;
    private int approved;
    private int isSelected;


    public String getContactName() {
        return contactName;
    }

    public void setContactName(String contactName) {
        this.contactName = contactName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getOperationCities() {
        return operationCities;
    }

    public void setOperationCities(String operationCities) {
        this.operationCities = operationCities;
    }

    public String getOperationNations() {
        return operationNations;
    }

    public void setOperationNations(String operationNations) {
        this.operationNations = operationNations;
    }

    public String getOperationProvinces() {
        return operationProvinces;
    }

    public void setOperationProvinces(String operationProvinces) {
        this.operationProvinces = operationProvinces;
    }

    public String getParentCompany() {
        return parentCompany;
    }

    public void setParentCompany(String parentCompany) {
        this.parentCompany = parentCompany;
    }

    public String getParentCompanyUserName() {
        return parentCompanyUserName;
    }

    public void setParentCompanyUserName(String parentCompanyUserName) {
        this.parentCompanyUserName = parentCompanyUserName;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public int getApproved() {
        return approved;
    }

    public void setApproved(int approved) {
        this.approved = approved;
    }

    public int getIsSelected() {
        return isSelected;
    }

    public void setIsSelected(int isSelected) {
        this.isSelected = isSelected;
    }

    /**
     * Describe the kinds of special objects contained in this Parcelable's
     * marshalled representation.
     *
     * @return a bitmask indicating the set of special object types marshalled
     * by the Parcelable.
     */
    @Override
    public int describeContents() {
        return 0;
    }

    /**
     * Flatten this object in to a Parcel.
     *
     * @param dest  The Parcel in which the object should be written.
     * @param flags Additional flags about how the object should be written.
     *              May be 0 or {@link #PARCELABLE_WRITE_RETURN_VALUE}.
     */
    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(contactName);
        dest.writeString(name);
        dest.writeString(operationCities);
        dest.writeString(operationNations);
        dest.writeString(operationProvinces);
        dest.writeString(parentCompany);
        dest.writeString(parentCompanyUserName);
        dest.writeString(phoneNumber);
        dest.writeString(role);
        dest.writeString(userName);
        dest.writeInt(approved);
        dest.writeInt(isSelected);
    }

    /**
     * 序列化实体类
     */
    public static final Creator<UserProfileData> CREATOR = new Creator<UserProfileData>() {
        public UserProfileData createFromParcel(Parcel source) {
            UserProfileData data = new UserProfileData();
            data.contactName = source.readString();
            data.name = source.readString();
            data.operationCities = source.readString();
            data.operationNations = source.readString();
            data.operationProvinces = source.readString();
            data.parentCompany = source.readString();
            data.parentCompanyUserName = source.readString();
            data.phoneNumber = source.readString();
            data.role = source.readString();
            data.userName = source.readString();
            data.approved = source.readInt();
            data.isSelected = source.readInt();

            return data;
        }

        public UserProfileData[] newArray(int size) {
            return new UserProfileData[size];
        }
    };

}
